Skip to content

Conversation

oojacoboo
Copy link
Contributor

This PR adds support for blameable on remove/deletion of an entity. This can be very useful, when used in conjunction with soft-delete. It obviously is useless without soft-delete.

Docs have been updated a tests added.

Copy link

codecov bot commented Mar 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.48%. Comparing base (8264aad) to head (c016b37).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2929      +/-   ##
==========================================
- Coverage   78.51%   78.48%   -0.03%     
==========================================
  Files         168      168              
  Lines        8782     8826      +44     
==========================================
+ Hits         6895     6927      +32     
- Misses       1887     1899      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@oojacoboo
Copy link
Contributor Author

Couple things here:

  • I don't understand why PHP 7.x is being supported still. Why can't people that need 7.4 support use an older version of this lib? How long do you guys intend on trying to continue to support it? It makes it difficult trying to properly type this lib when supporting such a old version. PHP isn't even supporting PHP 8.0 anymore. Annotations (only attributes supported) should be entirely dropped from this lib IMO, for all future versions.
  • What's going on with the PHPStan errors? I didn't make changes to these files.

@phansys
Copy link
Collaborator

phansys commented Mar 24, 2025

What's going on with the PHPStan errors? I didn't make changes to these files.

You are removing @phpstan-template annotations, so errors like this are expected:

Error: Generic type Gedmo\Mapping\MappedEventSubscriber<array, Gedmo\Mapping\Event\AdapterInterface> in PHPDoc tag @extends specifies 2 template types, but class Gedmo\Mapping\MappedEventSubscriber supports only 1: TConfig

@oojacoboo
Copy link
Contributor Author

oojacoboo commented Mar 26, 2025

@phansys I've resolved the PHPStan issues. I'm a bit confused with what's going on with PHPStan on this lib, though. There is a phpstan-baseline.neon file that's over 1200 lines of ignores. Also, does PHPStan not read the default phpdoc annotations now (@param, @return, etc)?

Also, IMO, it'd be a good idea to drop support for some of these unsupported versions of PHP. It's holding back the lib and making updates and codestyle much more difficult.

Please let me know if anything else is needed here - should be ready.

@oojacoboo
Copy link
Contributor Author

@mbabker @phansys Can we get this merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants